package com.smartfactory.sail.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.smartfactory.sail.entity.enums.StorageStatusEnum;
import com.smartfactory.sail.entity.enums.StorageType;
import com.smartfactory.sail.entity.enums.StorageUnit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 仓库当前情况/每种物品总情况
 * </p>
 *
 * @author 王巨壁
 * @since 2019-08-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "StorageCurrentInfo对象", description = "仓库当前情况/每种物品总情况")
public class StorageCurrentInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "仓库类型1成品|2原料|3废品")
    @TableField("storageType")
    private StorageType storageType;

    @TableField("itemId")
    private Long itemId;

    @ApiModelProperty(value = "数量")
    private Integer size;

    @ApiModelProperty(value = "可分配数量")
    @TableField("allocatableSize")
    private Integer allocatableSize;

    @ApiModelProperty(value = "计量单位1个2克3千克参考StorageUnit枚举")
    private StorageUnit unit;

    @ApiModelProperty(value = "库存上限")
    @TableField("upperLimit")
    private Integer upperLimit;

    @ApiModelProperty(value = "领取上限")
    @TableField("receiveUpperLimit")
    private Integer receiveUpperLimit;

    @ApiModelProperty(value = "库存下限")
    @TableField("lowerLimit")
    private Integer lowerLimit;

    @ApiModelProperty(value = "存放位置")
    private String addr;

    @ApiModelProperty(value = "位置码")
    @TableField("addrCode")
    private String addrCode;

    @ApiModelProperty(value = "库存状态1.充足2正常(低于上下限平均值)3.不足(低于下限)")
    @TableField("status")
    private StorageStatusEnum status;

    @ApiModelProperty(value = "创建人")
    @TableField("createUser")
    private String createUser;

    @ApiModelProperty(value = "创建时间yyyy-MM-dd HH:mm:ss")
    @TableField("createTime")
    private String createTime;

    @ApiModelProperty(value = "修改人")
    @TableField("updateUser")
    private String updateUser;

    @ApiModelProperty(value = "更新时间yyyy-MM-dd HH:mm:ss")
    @TableField("updateTime")
    private String updateTime;


}
